JBoss Community Archive (Read Only)

GateIn Portal 3.5

Custom Internationalization Resource Bundles

This section mentions code from Portal Extension Example from the [GateIn Portal Quickstarts |Appendix - Code Examples alias Quickstarts] collection.

There are two resource bundle customization scenarios possible with a Portal Extension:

Both scenarios can be demonstrated on locale.portal.extension resource bundle. To use this bundle we need to include it in both init.resources and portal.resource.names parameters of BaseResourceBundlePlugin in war/src/main/webapp/WEB-INF/conf/sample-ext/common/common-configuration.xml:Code Snippet error: Unable to retrieve the URL: https://github.com/gatein/gatein-portal-quickstart/blob/master/gatein-portal-extension/war/src/main/webapp/WEB-INF/conf/sample-ext/common/common-configuration.xml status code: 404.

The English version of locale.portal.extension can be found under war/src/main/webapp/WEB-INF/classes/locale/portal/extension_en.properties:Code Snippet error: Unable to retrieve the URL: https://github.com/gatein/gatein-portal-quickstart/blob/master/gatein-portal-extension/war/src/main/webapp/WEB-INF/classes/locale/portal/extension_en.properties status code: 404.

UIHomePagePortlet.Label.SubSlogan is a new key which is not available in default GateIn Portal installation.

However, UIHomePagePortlet.Label.Slogan is redefined in extension_en.properties shown above. In gatein.ear/web.war/WEB-INF/classes/locale/portlet/web/GroovyPortlet_en.properties it is already defined as

UIHomePagePortlet.Label.Slogan=The Best of eXo and JBoss Portal<div>GateIn #{gatein.version}</div>

and here, within the Portal Extension we assign a new value Congratulations! to it.

Please refer to the previous section for more details on internationalization of navigation nodes.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:47:30 UTC, last content change 2013-02-13 08:51:58 UTC.